package com.cmc.cloud.cmclink.doc.convert;

import com.cmc.cloud.cmclink.doc.entity.BasicConfigDO;
import com.cmc.cloud.cmclink.doc.vo.sovo.basicconfgvo.*;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * 用户自定义信息 Convert
 *
 * @author 集运管理员
 */
@Mapper
public interface BasicConfigConvert {
    /**
     * 获取转换接口的实例
     */
    BasicConfigConvert INSTANCE = Mappers.getMapper(BasicConfigConvert.class);

    /**
     * 将创建请求VO转换为DO
     *
     * @param bean 创建请求VO
     * @return DO
     */
    BasicConfigDO convert(BasicConfigCreateReqVO bean);

    /**
     * 将更新请求VO转换为DO
     *
     * @param bean 更新请求VO
     * @return DO
     */
    BasicConfigDO convert(BasicConfigUpdateReqVO bean);

    /**
     * 将DO转换为查询响应VO
     *
     * @param bean DO
     * @return VO
     */
    BasicConfigRespVO convert(BasicConfigDO bean);

    /**
     * 将DO列表转换为查询响应VO列表
     *
     * @param list DO列表
     * @return VO List
     */
    List<BasicConfigRespVO> convertList(List<BasicConfigDO> list);

    /**
     * 属性转换
     *
     * @param bean
     * @return
     */
    BasicConfigDO convertBasicConfigDO(BasicConfigJpBaseVO bean);

    /**
     * 属性转换
     *
     * @param basicConfigJpUpdateReqVO
     * @return
     */
    BasicConfigDO convertBasicConfigJpUpdateReqVO(BasicConfigJpUpdateReqVO basicConfigJpUpdateReqVO);


}
